import axios from "../until/axios";
import api from "./api";

// 请求广告
export const adList = (data) =>
  axios({
    method: "get",
    url: api.movie.advTitle,
    data,
  });

// 评论
export const comit = (data) =>
  axios({
    method: "get",
    url: api.movie.comments,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data,
  });

// 发表评论
export const publi = (data) =>
  axios({
    method: "post",
    url: api.movie.publication,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data,
  });

// 电影列表 没有图片
export const Film = () =>
  axios({
    method: "get",
    url: api.movie.critics,
  });

// 看过列表 没有播放地址 没有引入 没有渲染

export const Looked = (data) =>
  axios({
    method: "post",
    url: "/prod-api/api/movie/film/favorite/1",
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data,
  });
// 实际渲染的列表 有播放地址
export const timerL = () =>
  axios({
    method: "get",
    url: api.movie.timer,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

export const pinl = () =>
  axios({
    method: "get",
    url: api.movie.timer,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
  });

// 电影院列表
export const cinema = () =>
  axios({
    method: "get",
    url: api.movie.cinema,
  });

// 请求电影场次
export const canci = (data) =>
  axios({
    method: "get",
    url: api.movie.canci,
    data,
  });

// 买票接口
export const buypiao = (data) =>
  axios({
    method: "post",
    url: api.movie.buypiao,
    headers: {
      Authorization: window.localStorage.getItem("token"),
    },
    data,
  });
